package de.thm.exa.holders;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Objects;

public class PageList extends ArrayList<Page>
{
    protected Keyword value;
    
    public PageList(Keyword value, Collection<Page> col) { super(col); this.value = value; }
    
    public PageList(Keyword value) { super(); this.value = value; }
    
    public Keyword getKeyword() { return value; }
    
    @Override
    public boolean equals(Object other)
    {
        if( other instanceof Keyword )
        {
            return value.toString().equals(((Keyword)other).getValue().toString());
        } else {
            return false;
        }
    }

    @Override
    public int hashCode()
    {
        int hash = 7;
        hash = 41 * hash + Objects.hashCode(this.value);
        return hash;
    }
}
